#pragma once
#include <qwidget.h>

#include <vector>
#include <qplaintextedit>
#include <opencv2/opencv.hpp>
#include "InspectLL.h"
class QLineEdit;
class QPushButton;
class QGroupBox;
class QTableWidget;
class VisionMainWnd;
class QLabel;
struct tagMatchResult;
class MainPane :
    public QWidget
{
    Q_OBJECT
public:
    MainPane(QWidget* parent = nullptr);
    ~MainPane();

    void initLayout();
    void initTableWidget(QTableWidget* tab);

    void ShowLogs();
    void writeMatchObjResult(cv::Point2d objPos, double objAngle);
    void writeAllResults(MatchResults* all);
    void setShowTableMatchResults(bool show);

    void showStatisticInfo();

    void updateComboBox();

protected:
    void readModelConfig();

    void readModelsDir();       // 读取model目录下所有文件夹料号

private:
    VisionMainWnd* mainWnd_ = nullptr;

    QLabel* modelLabel_ = nullptr;
    QTableWidget* resultsTable_ = nullptr;
};

